home *** CD-ROM | disk | FTP | other *** search
/ MacAdvocate 2 / MACADVCT.ISO / mac / Goodies / Fun Stuff / Utilities / UltraFind / AppleScript™ Examples / UTF by Date < prev    next >
Text File  |  1996-12-30  |  1KB  |  40 lines

  1.  
  2. tell application "UltraFind 2.3"
  3.     clear
  4.     
  5.     set the dateModified of its searchRoutine to "today"
  6.     
  7.     --other examples : 
  8.     --(NOTE: use short date in LOCAL format, i.e. UK = DAY/MONTH/YEAR, but US = MONTH/DAY/YEAR, etc.)
  9.     --    set the dateModified of its searchRoutine to "before 1/1/96"
  10.     --    set the dateModified of its searchRoutine to "after 1/1/96"
  11.     --    set the dateModified of its searchRoutine to "between 1/1/96 10/1/96"
  12.     --    set the dateCreated of its searchRoutine to "on 1/1/96"
  13.     
  14.     scan
  15.     if the result is greater than 0 then
  16.         changeView finderView
  17.         sort by date last modified
  18.     end if
  19.     
  20. end tell
  21. copy the result to numFiles
  22.  
  23. if numFiles is greater than 0 then
  24.     repeat with fileNum from 1 to numFiles
  25.         
  26.         tell application "UltraFind 2.3"
  27.             copy (the filenamed of fileRecord fileNum) to fName
  28.             copy (the dateCreated of fileRecord fileNum) to crDate
  29.             copy (the dateModified of fileRecord fileNum) to mdDate
  30.             copy (the dateBackedUp of fileRecord fileNum) to bkDate
  31.         end tell
  32.         
  33.         display dialog "Found File " & (fileNum as text) & " of " & (numFiles as text) & return & return & ┬
  34.             "File  : " & fName & return & ┬
  35.             "Created : " & crDate & return & ┬
  36.             "Modified  : " & mdDate & return & ┬
  37.             "Backed-up : " & bkDate buttons {"Cancel", "Next"} default button 2
  38.     end repeat
  39. end if
  40.